package us.icitap.timsportal.notifications;

import org.vaadin.dialogs.ConfirmDialog;

import us.icitap.timsportal.resources.TimsPortalLabels;

import com.vaadin.ui.Window;

public class TimsPortalConfirmDialog {
	

	public static void show(final ConfirmDialogActions confActions,
			Window mainWindow, String pyetja) {

		ConfirmDialog.show(mainWindow,
				TimsPortalLabels.getLabel("title.pleaseConfirm"), pyetja, "JO", "PO",
				new ConfirmDialog.Listener() {
			
					private static final long serialVersionUID = 1L;

					public void onClose(ConfirmDialog dialog) {
						if (dialog.isConfirmed()) {
							// JO

							confActions.actNO();
						} else {
							// PO
							confActions.actYes();
						}
					}
				});
	}
}
